package com.xxl.spring.bean;

import lombok.Data;
import org.springframework.stereotype.Component;

@Data
@Component
public class Person {

    private String name;
    private Integer age;
    private Car car;

    public Person() {
    }

    public Person(String name, Integer age, Car car) {
        this.name = name;
        this.age = age;
        this.car = car;
    }

    public void init() {
        System.out.println("TestBean的初始化方法");
    }

    public void destroy() {
        System.out.println("TestBean的销毁方法");
    }
}